<template>
  <div id="app">
    <transition :name="aniType">
    <router-view></router-view>
     </transition>  
  </div>
</template>

<script>
import { mapState, mapGetters } from 'vuex';
import { Toast } from 'mint-ui'
export default {
  name: 'app',
  data () {
    return {
      aniType:""
    }
  },
  watch: {
    $route:function(nv,no){
      var nCount = nv.path.split("/").length;
      var oCount  = no.path.split("/").length;
      if(nCount>oCount){
        this.aniType = "pagein";
      }else if(nCount<oCount){
        this.aniType = "pageout";
      }else{
        this.aniType = "";
      }
    }
  },
  mounted(){
       this.$store.dispatch("loginRequest")
    },
}
</script>

<style>

</style>
